from django import forms
from .models import HostInfo,Host,Ip,Idc

class IdcForm(forms.ModelForm):
	class Meta:
		model = Idc
		fields = ['name','remark']

class HostForm(forms.ModelForm):
	class Meta:
		model = Host
		fields = ['hostname','number','application']
		labels = {'hostname':'主机名称','number':'编号','application':'应用'}


class IpForm(forms.ModelForm):
	class Meta:
		model = Ip
		fields = ['ip']
		labels = {'ip':'ip'}


class HostInfoForm(forms.ModelForm):
	class Meta:
		model = HostInfo
		fields = ['manufacturer','productmode','serialnumber','cpu','men','os','disk']
		labels = {'manufacturer':'厂商','productmode':'产品型号','serialnumber':'产品序列号','cpu':'CPU核心数','men':'内存','os':'操作系统','disk':'硬盘大小'}